package com.hospital.wx.util.annotation;

import com.hospital.wx.util.validator.SensitiveWordsValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/*
* 自定义敏感词扫描注解
* */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = SensitiveWordsValidator.class)
public @interface NoSensitiveWords {
    String message() default "内容包含敏感词，请修改后再提交";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
} 